package com.zhangshuo.config;
/*
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;*/

/**
 * Created by Administrator on 2017/6/1 0001.
 * spring security 配置文件
 * 这个只是最基本的，后续功能再加
 * 先取消这个，再试shiro的用法
 */
/*@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true)*/
//public class SpringWebSecurityConfig extends WebSecurityConfigurerAdapter {
    public class SpringWebSecurityConfig  {

  /*  @Override
    protected void configure(HttpSecurity http) throws Exception {
        http.formLogin().failureUrl("/login?error").defaultSuccessUrl("/home/home").permitAll();
        http.logout().invalidateHttpSession(true).logoutSuccessUrl("/login?logout").logoutUrl("/logout");
        super.configure(http);
    }

    @Override
    public void configure(WebSecurity web) throws Exception {
        super.configure(web);
    }


    @Autowired
    public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
        //定义的内存用户
        auth
                .inMemoryAuthentication()
                .withUser("Brave").password("123").roles("USER");
    }*/


}
